clc; clear; close all;
path = genpath('../../matlab');
addpath(path)

%% Evaluation on Cityscapes
categories = categories_city();
% Original GT (Thin)
eval_dir = {'../../../exps/cityscapes/dff/dff_val/fuse';...
            '../../../exps/cityscapes/casenet/casenet_val/fuse'};
result_dir = {'../../../exps/cityscapes/result/evaluation/test/inst/gt_orig_thin/dff';...
              '../../../exps/cityscapes/result/evaluation/test/inst/gt_orig_thin/casenet'};
evaluation('../../../data/cityscapes-preprocess/gt_eval/gt_thin/val.mat', '../../../data/cityscapes-preprocess/gt_eval/gt_thin',...
           eval_dir, result_dir, categories, 0, 99, true, 0.02) % 0.0035
% Original GT (Raw)
eval_dir = {'../../../exps/cityscapes/dff/dff_val/fuse';...
            '../../../exps/cityscapes/casenet/casenet_val/fuse'};
result_dir = {'../../../exps/cityscapes/result/evaluation/test/inst/gt_orig_raw/dff';...
              '../../../exps/cityscapes/result/evaluation/test/inst/gt_orig_raw/casenet'};
evaluation('../../../data/cityscapes-preprocess/gt_eval/gt_raw/val.mat', '../../../data/cityscapes-preprocess/gt_eval/gt_raw',...
           eval_dir, result_dir, categories, 0, 99, false, 0.02) % 0.0035

%% Evaluation on SBD
categories = categories_sbd();
% Original GT (Thin)
eval_dir = {'../../../exps/sbd/dff/dff_val/fuse';...
            '../../../exps/sbd/casenet/casenet_val/fuse'};
result_dir = {'../../../exps/sbd/result/evaluation/test/inst/gt_orig_thin/dff';...
              '../../../exps/sbd/result/evaluation/test/inst/gt_orig_thin/casenet'};
evaluation('../../../data/sbd-preprocess/gt_eval/gt_orig_thin/test.mat', '../../../data/sbd-preprocess/gt_eval/gt_orig_thin/inst',...
           eval_dir, result_dir, categories, 5, 99, true, 0.02)
% Original GT (Raw)
eval_dir = {'../../../exps/sbd/dff/dff_val/fuse';...
            '../../../exps/sbd/casenet/casenet_val/fuse'};
result_dir = {'../../../exps/sbd/result/evaluation/test/inst/gt_orig_raw/dff';...
              '../../../exps/sbd/result/evaluation/test/inst/gt_orig_raw/casenet'};
evaluation('../../../data/sbd-preprocess/gt_eval/gt_orig_raw/test.mat', '../../../data/sbd-preprocess/gt_eval/gt_orig_raw/inst',...
           eval_dir, result_dir, categories, 5, 99, false, 0.02)
